翻訳と辞書
Words near each other
・ Intef I
・ Intef II
・ Intef III
・ Intef the Elder
・ Intefiqer
・ Integer
・ Integer (computer science)
・ Integer BASIC
・ Integer broom topology
・ Integer circuit
・ Integer complexity
・ Integer factorization
・ Integer factorization records
・ Integer function
・ Integer lattice
Integer literal
・ Integer matrix
・ Integer Matrix Library
・ INTEGER Millennium House
・ Integer overflow
・ Integer points in convex polyhedra
・ Integer programming
・ Integer relation algorithm
・ Integer sequence
・ Integer sequence prime
・ Integer set library
・ Integer sorting
・ Integer square root
・ Integer triangle
・ Integer-valued function


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Integer literal : ウィキペディア英語版
Integer literal
In computer science, an integer literal is an integer whose value is directly represented in source code. For example, in the assignment statement x = 1, the string 1 is an integer literal indicating the value 1, while in the statement x = 0x10 the string 0x10 is an integer literal indicating the value 16, which is represented by 10 in hexadecimal (indicated by the 0x prefix).
By contrast, in x = cos(0), the expression cos(0) evaluates to 1 (as the cosine of 0), but the value 1 is not ''literally'' included in the source code. More simply, in x = 2 + 2, the expression 2 + 2 evaluates to 4, but the value 4 is not literally included. Further, in x = "1" the "1" is a string literal, not an integer literal, because it is in quotes. The value of the string is 1, which happens to be an integer string, but this is semantic analysis of the string literal – at the syntactic level "1" is simply a string, no different from "foo".
==Parsing==
Recognizing a string (sequence of characters in the source code) as an integer literal is part of the lexical analysis (lexing) phase, while evaluating the literal to its value is part of the semantic analysis phase. Within the lexer and phrase grammar, the token class is often denoted integer, with the lowercase indicating a lexical-level token class, as opposed to phrase-level production rule (such as ListOfIntegers). Once a string has been lexed (tokenized) as an integer literal, its value cannot be determined syntactically (it is ''just'' an integer), and evaluation of its value becomes a semantic question.
Integer literals are generally lexed with regular expressions, as in Python.〔"(2.4.4. Integer and long integer literals )"〕

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Integer literal」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.